package com.sdp.lease.db.l_wz_lease_info.service.impl;

import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.sdp.lease.db.l_wz_lease_info.entity.LWzLeaseInfo;
import com.sdp.lease.db.l_wz_lease_info.mapper.LWzLeaseInfoMapper;
import com.sdp.lease.db.l_wz_lease_info.service.ILWzLeaseInfoService;
import com.sdp.lease.utils.LeaseConstants;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author zsp
 * @since 2024-07-27
 */
@Service
public class LWzLeaseInfoServiceImpl extends ServiceImpl<LWzLeaseInfoMapper, LWzLeaseInfo> implements ILWzLeaseInfoService {

	@Override
	public int wzLeaseInfoNumber() {
		LambdaQueryWrapper<LWzLeaseInfo> queryWrapper = new LambdaQueryWrapper<>();
		queryWrapper.eq(LWzLeaseInfo::getApplyState, LeaseConstants.申请状态_申请中.getCode());
		queryWrapper.or().eq(LWzLeaseInfo::getIsHandle, LeaseConstants.否.getCode());
		return count(queryWrapper);
	}

}
